package com.example.broadcast.receiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import androidx.core.util.Consumer

class TimeTickReceiver(val function:Consumer<String>):BroadcastReceiver() {

    var count:Int = 0

    override fun onReceive(context: Context?, intent: Intent?) {
        function.accept("时间刷新 $count")
        count++
    }
}